package com.suray.wcs.service.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.suray.wcs.service.system.entity.LedDB;
import com.suray.wcs.service.system.mapper.LeddbMapper;
import com.suray.wcs.service.system.service.LedService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("ledService")
public class LedServiceImpl extends ServiceImpl<LeddbMapper, LedDB> implements LedService {
    @Resource
    private LeddbMapper leddbMapper;

    /**
     * LED编号获取LED
     *
     * @return
     */
    @Override
    public LedDB getLedDBByLedNo(Integer ledNo) {
        LambdaQueryWrapper<LedDB> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(LedDB::getLedNo, ledNo);
        return leddbMapper.selectOne(queryWrapper);
    }
}
